| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

ContentLoader.h
1 // ContentLoader.h
3 //
5
6 namespace nkScripts
7 {
11 class ContentLoader final
12 {
13 public :
14
22 static nkExport::ExporterLoadResult inputData (nkMemory::StringView filePath) ;
29 static nkMemory::String inputDataStr (nkMemory::StringView filePath) ;
36 static nkExport::ExporterLoadResult inputDataSources (nkMemory::StringView sources) ;
45 static bool outputData (nkMemory::StringView content, nkMemory::StringView path) ;
46
54 static bool saveTreeDeclaration (nkExport::Node* tree, nkMemory::StringView pathFromData) ;
62 static bool saveObjectDeclaration (nkExport::Exportable* object, nkMemory::StringView pathFromData) ;
63
71 static ContentLoadResultScript loadScriptDeclaration (nkMemory::StringView pathFromData, bool loadResource = true) ;
79 static ContentLoadResultScript processScriptSources (nkMemory::StringView sources, bool loadResource = true) ;
87 static ContentLoadResultScript processScriptTree (nkExport::Node* tree, bool loadResource = true) ;
88 } ;
89 }
nkScripts::ContentLoader::processScriptSources
static ContentLoadResultScript processScriptSources(nkMemory::StringView sources, bool loadResource=true)
nkScripts::ContentLoader::saveTreeDeclaration
static bool saveTreeDeclaration(nkExport::Node *tree, nkMemory::StringView pathFromData)
nkScripts
Encompasses all API of component NilkinsScripts.
Definition: Environment.h:7
nkExport::Exportable
An interface to define objects that can be exported using this component.
Definition: Exportable.h:15
nkScripts::ContentLoadResult
Holds information about a content load attempt.
Definition: ContentLoadResult.h:23
nkScripts::ContentLoader::loadScriptDeclaration
static ContentLoadResultScript loadScriptDeclaration(nkMemory::StringView pathFromData, bool loadResource=true)
nkScripts::ContentLoader::processScriptTree
static ContentLoadResultScript processScriptTree(nkExport::Node *tree, bool loadResource=true)
nkScripts::ContentLoader::inputDataStr
static nkMemory::String inputDataStr(nkMemory::StringView filePath)
nkExport::ExporterLoadResult
Holds the information about a try to import data sources.
Definition: ExporterLoadResult.h:15
nkScripts::ContentLoader::inputDataSources
static nkExport::ExporterLoadResult inputDataSources(nkMemory::StringView sources)
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkScripts::ContentLoader::saveObjectDeclaration
static bool saveObjectDeclaration(nkExport::Exportable *object, nkMemory::StringView pathFromData)
nkScripts::ContentLoader
Allows to export and import content through their declaration files.
Definition: ContentLoader.h:12
nkMemory::String
Class holding information about a string, with ownership over the data.
Definition: String.h:22
nkScripts::ContentLoader::inputData
static nkExport::ExporterLoadResult inputData(nkMemory::StringView filePath)
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkScripts::ContentLoader::outputData
static bool outputData(nkMemory::StringView content, nkMemory::StringView path)